or, How to patch the Mac OS 8 Finder to work the way you want
by Jerry Kindall mailto:kindall@manual.com
Manual Labor http://www.manual.com/
Introduction
___________
Half the email I got about my Finder patch asked me how to change something I patched. So thatΓÇÖs why IΓÇÖm writing this little file.
You will need a copy of ResEdit to follow along. You can download a copy from AppleΓÇÖs FTP site; itΓÇÖs free. Try ftp://ftp.info.apple.com/Apple.Support.Area/Apple.Software.Updates/US/Macintosh/Utilities/ResEdit_2.1.3.sea.hqx (whew!).
If you plan to do a lot of this kind of stuff, buy yourself a copy of Resorcerer from Mathemæesthetics. You’ll be glad you did. Find out more at http://www.mathemaesthetics.com/.
Make these patches only to a copy of the Finder. Remember, you canΓÇÖt change a copy of the Finder thatΓÇÖs running. ItΓÇÖs best to follow the procedure I outlined in my instructions for actually installing the patch: option-drag the running Finder to the desktop, drop it on ResEdit and make the desired changes, move the running Finder to the Trash, move the edited Finder into the System Folder, and restart. DonΓÇÖt empty the Trash until youΓÇÖve tested the new Finder to make sure it works properly.
Without further ado, hereΓÇÖs a brief explanation of the FinderΓÇÖs resources.
Resource Types
______________
Upon opening the Finder in ReEdit, youΓÇÖll see a bunch of icons, each representing a different kind of resource. Resource types are identified with four-character codes, such as ΓÇ£STR#ΓÇ¥ or ΓÇ£PICTΓÇ¥ or ΓÇ£snd ΓÇ£. (Although ΓÇ£snd ΓÇ£ looks like a three-character code, the fourth character is a space, and is part of the type identifier.)
The four resource types weΓÇÖre most interested in for our nefarious purposes are:
STR (thatΓÇÖs S-T-R-space) is a single piece of text: a string. These kinds of resources hold various bits of text used by the Finder. (TheyΓÇÖre in STR resources, rather than in the FinderΓÇÖs code, to make them easier to change for other languages.)
STR# is whatΓÇÖs called a string list (the # is a convention meaning ΓÇ£listΓÇ¥). Basically, instead of storing individual strings like a STR resource, a STR# resource holds a group of strings which are somehow related. ItΓÇÖs up to the programmer to decide how to organize his strings and to decide what STR# (or STR) resource they should go in.
PICT stores pictures. ResEdit lets you just paste them in. Easy enough, huh?
fmn2 stores Finder menus. Usually menus would be stored in MENU resources (makes sense, huh?). But with System 7.5, AppleΓÇÖs programmers discovered that they needed to store more information with each menu than was possible in a MENU resource, so they invented the fmnu (Finder menu) resource. With Mac OS 8.0, they needed to make some more changes, and invented the fmn2 resource. In case youΓÇÖre wondering, upper case and lower case make a difference when dealing with resource types. A MENU is not a Menu, if you catch my drift, although it is (generically) a menu.
The good news about editing menus in ResEdit is that the program has a built-in menu editor thatΓÇÖs quite easy to use. The bad news is that it only works with MENU resources. However, IΓÇÖve included a copy of Satoru IwatsuΓÇÖs fmn2 template, which makes it possible to edit fmn2 resources in a semi-friendly manner.
Editing STRs
___________
LetΓÇÖs go STR-hunting first. ItΓÇÖs the easiest. Double-click the STR icon in the Finder window. A list of all the available STR resources will appear, in whatΓÇÖs called a picker window. Each resource of a given type has a unique number, which appears in the pickerΓÇÖs leftmost column. The second column indicates the size (in bytes) of each resource. The third column is the resourceΓÇÖs name. (None of the STR resources in the Finder have a name.)
To edit a STR resource, just double-click it. ResEdit displays the text in a window and allows you to edit it. Try STR 4000; this string is the one the Finder uses for the title of the ΓÇ£About This ComputerΓÇ¥ (or ΓÇ£About This MacintoshΓÇ¥) window. Other bits of text of interest will become obvious; just browse a little. (If you have Resourceror, you can use its Find command to help you hunt.)
Editing STR#s
_____________
Opening the STR# icon displays another picker much like the STR one. But when you open a particular STR# resource, you see not a single string but a number of them in a scrollable window. Simply tab from one to the next.
Here are some STR#s you should check out:
Resource ID String # Function
4500 3 Name of new folder (ΓÇ¥untitled folderΓÇ¥ is the default)
4500 4 ΓÇ£copyΓÇ¥ suffix for duplicate files. Delete entirely for the behavior
documented in my patch. DonΓÇÖt forget to put the space in front
if you want some other suffix
8200 1 ΓÇ£aliasΓÇ¥ suffix for Make Alias command; includes the space
between the name of the file and the suffix
4000 6 Text used for ΓÇ£About this ComputerΓÇ¥ menu item. The ^0
means that either the text ΓÇ£ComputerΓÇ¥ or ΓÇ£MacintoshΓÇ¥
will be inserted at runtime. Just change to whatever text
you want.
5816 1 This is the text used for font samples
Editing PICTs
____________
To edit a pict, you just doeble-click it in the PICT picker, then paste in the new image. The pic displayed in the ΓÇ£AboutΓÇ¥ window is PICT ID 4000 and is 248 pixels wide and 42 pixels high. If you want the picture to look good on a 256-color screen, be sure to convert it to the 8-bit Macintosh system palette before pasting it in.
Editing fmn2s
_____________
Editing these becomes much easier with the fmn2 template included with this file. Just open the included template (which was designed by Satoru Iwatsu) in ResEdit. Leave it open while you also open a fmn2 resource in the Finder. Resources 520 through 524 hold the five menus for the ΓÇ£standardΓÇ¥ Finder. Resources 526 through 530 hold the menus for the ΓÇ£simpleΓÇ¥ Finder. (Increase these resource IDs by one under Mac OS 8.5. DonΓÇÖt ask me why.) As you scroll the window that holds the menu, youΓÇÖll see a number of different fields for each menu. You can freely edit the ShortCut or MenuItem for any displayed menu item.
To delete a menu item, click the number of the item to be deleted (itΓÇÖll have a row of asterisks next to it). Then hit the Delete key. You will also need to decrease the Count field at the top of the resource by one.
To insert a menu item, click the number that you want the new menu item to be, then choose ΓÇ£Insert New Field(s)ΓÇ¥ from the Resource menu. Enter the four-character command code in the Command field, leave Flag and unused set to zero, and enter the menu itemΓÇÖs desired shortcut and text. (You can find out the code for a command by looking at the other menu resources. ΓÇ£quitΓÇ¥ is the code for the Quit Finder command.) Again, be sure to edit the Count field at the top of the resource to reflect the fact that you added a new menu item. To add a separator, use a Menu Item of ΓÇ£-ΓÇ¥ (hyphen). The Command and ShortCut are ignored.
Memory Allocation
_________________
Edit the SIZE -1 resource. Scroll down to the bottom of the window and change the Size field, which is the applicationΓÇÖs memory allocation in bytes. Do not under any circumstances change any of the other things in this window.
Done!
_____
DonΓÇÖt forget to save! Hope you enjoyed this brief tour of Finder patching.